package cn.gson.boot.model.dao;

import cn.gson.boot.model.pojos.YuangongJuese;
import org.springframework.data.jpa.repository.Modifying;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.CrudRepository;

import javax.transaction.Transactional;

public interface YuanGongJueSeDao extends CrudRepository<YuangongJuese,Integer> {

    // 先删除此员工的所有角色
    @Transactional
    @Modifying(clearAutomatically = true)
    @Query(nativeQuery = true,value = "delete from yuangong_juese where emp_id=?1")
    public void deleteEmpJueSe(Integer empId);
}
